from sqlalchemy import Column, String, DateTime, Integer, func

from utils.work_db import Base


class WeixinQrcode(Base):
    __tablename__ = 'weixin_qrcode'
    openid = Column(String, primary_key=True)
    qrcode_type = Column(Integer)
    expire_time = Column(Integer, default=0)  # 过期时间戳，临时二维码有意义
    ticket = Column(String)
    url = Column(String)
    create_time = Column(DateTime, default=func.now())
    update_time = Column(DateTime, default=func.now())
